bd83fb0ed58cc70f5e66799522e542f15980e9cc,maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java,DescribeMojo,getMojoDescriptor,#String#MavenSession#MavenProject#String#boolean#boolean#,1064

Before Change


        }
        catch ( InvocationTargetException e )
        {
            throw new MojoFailureException( "InvocationTargetException: " + e.getMessage() );
        }
    }

After Change


            m.setAccessible( true );
            MojoDescriptor mojoDescriptor = (MojoDescriptor) m.invoke( lifecycleExecutor, new Object[] { task, session, project,
                invokedVia, Boolean.valueOf( canUsePrefix ), Boolean.valueOf( isOptionalMojo ) } );
            if ( mojoDescriptor == null )
            {
                throw new MojoExecutionException( "No MOJO exists for '" + task + "'." );
            }
            return mojoDescriptor;
        }
        catch ( SecurityException e )
        {
            throw new MojoFailureException( "SecurityException: " + e.getMessage() );
        }
        catch ( IllegalArgumentException e )
        {
            throw new MojoFailureException( "IllegalArgumentException: " + e.getMessage() );
        }
        catch ( ComponentLookupException e )
        {
            throw new MojoFailureException( "ComponentLookupException: " + e.getMessage() );
        }
        catch ( NoSuchMethodException e )
        {
            throw new MojoFailureException( "NoSuchMethodException: " + e.getMessage() );
        }
        catch ( IllegalAccessException e )
        {
            throw new MojoFailureException( "IllegalAccessException: " + e.getMessage() );
        }
        catch ( InvocationTargetException e )
        {
            Throwable cause = e.getCause();

            if ( cause instanceof BuildFailureException )
            {
                throw new MojoFailureException( "BuildFailureException: " + cause.getMessage() );
            }
            else if ( cause instanceof LifecycleExecutionException )
            {
                throw new MojoFailureException( "LifecycleExecutionException: " + cause.getMessage() );
            }
            else if ( cause instanceof PluginNotFoundException )
            {
                throw new MojoFailureException( "PluginNotFoundException: " + cause.getMessage() );
            }

            throw new MojoFailureException( "InvocationTargetException: " + e.getMessage() );
        }
    }